home *** CD-ROM | disk | FTP | other *** search
/ New Star Software Collection / NSS_Collection.iso / 3-069 qemm 603 / 1.ima / QEMM-MAN / CH6.QEM < prev    next >
Encoding:
Text File  |  1991-10-07  |  9.0 KB  |  248 lines

  1. Chapter 6 
  2.  
  3. The DOS Resource Programs
  4.  
  5. The DOS Resource Programs let you manage the data structures used
  6. by DOS. You may use these programs by themselves, either to
  7. determine the current memory used or to add resources out of
  8. conventional memory. Their use with the LOADHI programs will
  9. benefit you the most. 
  10.  
  11. DOS always allocates memory for each resource. The amount
  12. allocated varies according to the DOS version. Earlier versions
  13. of DOS do not have support for some of the resources. Users
  14. increase the memory for a resource by including a statement in
  15. their CONFIG.SYS file. DOS reads and processes this file during
  16. its boot sequence.  
  17.  
  18. This chapter discusses each of the DOS resource allocation
  19. programs. Each DOS resource is described briefly. Changes or
  20. additions to your CONFIG.SYS and AUTOEXEC.BAT files are given
  21. where needed. This information should also help those of you who
  22. are taking advantage of increasing these DOS resources for the
  23. first time.
  24.  
  25. ~Subhead~ Using the DOS Resource Programs
  26.  
  27. The programs described in this chapter are all used in much the
  28. same way. Running the program without any parameters gives you a
  29. report on the current memory allocation for the resource. All
  30. programs accept a numeric parameter which increases the memory
  31. available to DOS for that resource. And each allocates this
  32. additional memory from high RAM when you use LOADHI.
  33.  
  34. To use high RAM effectively, you change CONFIG.SYS to reduce the
  35. memory allocation. You then change AUTOEXEC.BAT to increase the
  36. resource.
  37.  
  38. The parameters these programs use share a common syntax. A
  39. number, or a number preceded by an equals sign (nn or =nn), gives
  40. the total number of data structures needed. A number preceded by
  41. a plus sign (+nn), adds that many more structures. All the
  42. programs add memory; you cannot use them to reduce the memory
  43. allocated to a resource.
  44.  
  45. ~Subhead~ BUFFERS.COM
  46.  
  47. The DOS buffers resource can improve disk I/O response times. DOS
  48. always has some number of disk sector buffers allocated. The
  49. default number varies, according to the version of DOS, from 2 to
  50. 15 buffers. You can add more buffers with a statement in your
  51. CONFIG.SYS file. For example, the statement, BUFFERS=30,
  52. allocates space for a total of thirty sector buffers. Each sector
  53. buffer requires 528 bytes of memory.  
  54.  
  55. NOTE: Do not use BUFFERS.COM in DOS 4.0 systems. The structure of
  56. the disk buffers is different, and BUFFERS.COM does not support
  57. that format.
  58.  
  59.  Without the services of BUFFERS with LOADHI, buffers are
  60. allocated out of conventional memory. Adding buffers can improve
  61. program response time but reduces the memory available to your
  62. applications. Also, one application may benefit from sector
  63. buffering while another is unaffected. Much depends upon how they
  64. access the files they use.  Having your disk buffers allocated
  65. out of high RAM can, therefore, keep the benefits of disk
  66. buffering and avoid the associated penalty.
  67.  
  68. You can display a report of the number of buffers now allocated:
  69.  
  70. ~Step~ Type BUFFERS and press <Enter>.
  71.  
  72. The program responds by reporting " BUFFERS=30 now".
  73.  
  74. To load 30 buffers in High RAM:
  75.  
  76. ~Step~ Type LOADHI BUFFERS +30 and press <Enter>.
  77.  
  78. The program responds by reporting:
  79.  
  80. BUFFERS=30  before
  81. 30 buffers added
  82. BUFFERS=60 now
  83.  
  84. If you have a BUFFERS=statement in your CONFIG.SYS file, we
  85. recommend loading your buffers in high memory. Let's assume for
  86. our example that you have previously determined that you require
  87. 40 disk buffers, so the CONFIG.SYS file now contains the
  88. statement, BUFFERS=40. To load these in high memory: 
  89.  
  90. ~Step~ First change the BUFFERS statement in your CONFIG.SYS
  91. toBUFFERS=1. 
  92.  
  93. This specifies a small number of buffers to override any default
  94. DOS allocation. If you simply remove this statement from
  95. CONFIG.SYS you may end up with as many as fifteen disk buffers
  96. allocated out of conventional memory.
  97.  
  98.  
  99. ~Step~ Next change your AUTOEXEC.BAT file so the first statement
  100. isLOADHI BUFFERS=40 or +39.
  101.  
  102. NOTE: Make it the first statement so other AUTOEXEC.BAT
  103. statements can take advantage of disk buffering. You will need to
  104. specify the directory for LOADHI and BUFFERS if you have not yet
  105. set your PATH.
  106.  
  107. ~Subhead~ FILES.COM
  108.  
  109. DOS uses the files resource to keep track of disk files while
  110. they are open. The files resource is a data structure requiring
  111. about 53 bytes for each open file.  This data structure is
  112. closely related to a DOS file handle, so that term is used here.
  113.  
  114. The default number of file handles DOS allocates is small and
  115. seldom enough. Many of the larger applications require more. A
  116. program such as DESQview, which allows multiple programs to be
  117. running concurrently, requires at least this much. Depending on
  118. the active applications, DESQview may require even more. It is
  119. quite likely that you already have a FILES= statement in your
  120. CONFIG.SYS file. FILES=20 is a common setting.
  121.  
  122. You can display a report of the number of files now allocated:
  123.  
  124. ~Step~ Type FILES and press <Enter>.
  125.  
  126. The program responds by reporting "FILES=20 now".
  127.  
  128. To add 20 files in high memory:
  129.  
  130. ~Step~ Type LOADHI FILES +20 and press <Enter>.
  131.  
  132. The program responds by reporting: 
  133.  
  134. FILES=20 before
  135. 20 files added
  136. FILES=40 now
  137.  
  138. Whether you do or do not currently have a FILES= statement in
  139. your CONFIG.SYS file, we recommend loading files in high memory.
  140. Let's assume for our example that you have previously determined
  141. that you require 30 files, so your CONFIG.SYS file now contains
  142. the statement, FILES=30. To load FILES in high memory:
  143.  
  144. ~Step~ Change the FILES statement in your CONFIG.SYS file to
  145. FILES=10.
  146.  
  147. This statement allocates 10 file handles. This number puts only a
  148. small burden on the use of conventional memory, while avoiding
  149. problems with certain applications.
  150.  
  151. ~Step~ Add the statement, LOADHI FILES=40 in your AUTOEXEC.BAT
  152. file.
  153.  
  154. ~Subhead~ FCBS.COM
  155.  
  156. DOS uses the FCB resource to keep track of File Control Blocks
  157. (FCBs). Versions of DOS prior to DOS 2.0 used FCBs exclusively to
  158. open and manage open disk files. Since DOS 2.0, the preferred
  159. method of file access involves the use of file handles. Because
  160. some programs written before DOS 2.0 are still in use, the use of
  161. FCBs is still supported.    
  162.  
  163. Skip this section if you are not using SHARE and do not have an
  164. FCBS statement in your CONFIG.SYS file. Also, this resource is
  165. not available in DOS version 2 systems.  
  166.  
  167. The FCB management by DOS involves two numbers. The first number
  168. instructs DOS to allocate memory for that many FCBs. The second
  169. number indicates how many of those FCBs should be protected when
  170. DOS needs to close an open FCB. Each FCB resource allocated
  171. requires about 53 bytes.  
  172.  
  173. NOTE: The FCB resource uses contiguous memory. When you add FCBs,
  174. a new block of memory for the entire table must be allocated. The
  175. memory used by the original table is not recovered.
  176.  
  177. You can display a report of the number of files now allocated:
  178.  
  179. ~Step~ Type FCBS and press <Enter>.
  180.  
  181. The program responds by reporting "FCBS=4,0 now".
  182.  
  183. To add to add 4 more FCBs, with 2 additional FCBs protected.
  184.  
  185. ~Step~ Type LOADHI FCBS +4,2 and press <Enter>.
  186.  
  187. The program responds by reporting:
  188.  
  189. FCBS=4,0 before
  190. 4 FCBs added
  191. 2 protected FCBs added
  192. FCBs=8,2 now
  193.  
  194. If you currently have a FCBs= statement in your CONFIG.SYS file,
  195. we recommend loading FCBs in high memory. Let's assume for our
  196. example that you have previously determined that you require 8,2
  197. FCBs, so your CONFIG.SYS file now contains the statement,
  198. FCBS=8,2. To load FCBs in high memory:
  199.  
  200. ~Step~ Remove the FCBS= statement in your CONFIG.SYS.
  201.  
  202. ~Step~ Add the statement, LOADHI FCBS 8,2, to your AUTOEXEC.BAT
  203. file.
  204.  
  205. ~Subhead~ LASTDRIV.COM
  206.  
  207. DOS uses the last drive resource to support both physical and
  208. logical disk drives. Logical disk drives are useful if you use
  209. the DOS SUBST program.  Each drive entry in DOS's drive table
  210. requires about 80 bytes. 
  211.  
  212. You can add drive table support using the numerical parameters
  213. you have seen throughout this section or you can set it using a
  214. drive letter.
  215.  
  216. NOTE: The DOS drive table uses contiguous memory. When you add
  217. more drives, a new block of memory for the entire table must be
  218. allocated. The memory used for the original drive table is not
  219. recovered.
  220.  
  221. You can display a report of the number of files now allocated:
  222.  
  223. ~Step~ Type LASTDRIVE and press <Enter>.
  224.  
  225. The program responds by reporting:
  226.  
  227. LASTDRIVE=E now
  228.  
  229. To load a new drive table in high RAM:
  230.  
  231. ~Step~ Type LOADHI LASTDRIV G and press <Enter>.
  232.  
  233. The program responds by reporting:
  234.  
  235. LASTDRIVE=E  before
  236. 2  drives  added
  237. LASTDRIVE=G now
  238.  
  239. We recommend that you change your LASTDRIVE= statement in
  240. CONFIG.SYS so only your actual disk volumes are specified (For
  241. example, LASTDRIVE=D). If your hard disk is partitioned, the
  242. drive letter should correspond to the last partition. This
  243. minimizes the "lost" memory. Then load logical drives in high
  244. memory. For example to add three logical drives:
  245.  
  246. ~Step~ Add the statement, LOADHI LASTDRIV +3, to your
  247. AUTOEXEC.BAT file. 
  248.